package cn.cagurzhan.domain.dto;

import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author AjaxZhan
 */
@Data
public class DeviceInfoUploadDto implements Serializable {
    private String resource;
    private String event;
    private Date event_time;
    private Date event_time_ms;
    private String request_id;
    private DevicePropertyReportNotifyData notify_data;

    @Data
    public static  class DevicePropertyReportNotifyData{
        private NotifyDataHeader header;
        private DevicePropertyReport body;
    }
    @Data
    public static class NotifyDataHeader{
        private String app_id;
        private String device_id;
        private String node_id;
        private String product_id;
        private String gateway_id;
    }

    @Data
    public static class DevicePropertyReport{
        private List<DevicePropertyV5> services;
    }

    @Data
    public static class DevicePropertyV5{
        private String service_id;
        private Map<String,Object> properties;
        private Date event_time;
    }
}
